package com.zycfc.zsf.boot.mq.rabbitmq.retry;

import java.io.*;
import org.springframework.amqp.core.*;

public class MessageCache implements Serializable
{
    private static final long serialVersionUID = 1L;
    private String id;
    private String exchangeName;
    private String routingKey;
    private Message message;
    private long firstSendTime;
    private long lastSendTime;
    private volatile boolean sended;
    
    public MessageCache() {
        this.sended = false;
    }
    
    public String getId() {
        return this.id;
    }
    
    public String getExchangeName() {
        return this.exchangeName;
    }
    
    public String getRoutingKey() {
        return this.routingKey;
    }
    
    public Message getMessage() {
        return this.message;
    }
    
    public long getFirstSendTime() {
        return this.firstSendTime;
    }
    
    public long getLastSendTime() {
        return this.lastSendTime;
    }
    
    public boolean isSended() {
        return this.sended;
    }
    
    public void setId(final String id) {
        this.id = id;
    }
    
    public void setExchangeName(final String exchangeName) {
        this.exchangeName = exchangeName;
    }
    
    public void setRoutingKey(final String routingKey) {
        this.routingKey = routingKey;
    }
    
    public void setMessage(final Message message) {
        this.message = message;
    }
    
    public void setFirstSendTime(final long firstSendTime) {
        this.firstSendTime = firstSendTime;
    }
    
    public void setLastSendTime(final long lastSendTime) {
        this.lastSendTime = lastSendTime;
    }
    
    public void setSended(final boolean sended) {
        this.sended = sended;
    }
    
    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof MessageCache)) {
            return false;
        }
        final MessageCache other = (MessageCache)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0065: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0065;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$exchangeName = this.getExchangeName();
        final Object other$exchangeName = other.getExchangeName();
        Label_0102: {
            if (this$exchangeName == null) {
                if (other$exchangeName == null) {
                    break Label_0102;
                }
            }
            else if (this$exchangeName.equals(other$exchangeName)) {
                break Label_0102;
            }
            return false;
        }
        final Object this$routingKey = this.getRoutingKey();
        final Object other$routingKey = other.getRoutingKey();
        Label_0139: {
            if (this$routingKey == null) {
                if (other$routingKey == null) {
                    break Label_0139;
                }
            }
            else if (this$routingKey.equals(other$routingKey)) {
                break Label_0139;
            }
            return false;
        }
        final Object this$message = this.getMessage();
        final Object other$message = other.getMessage();
        if (this$message == null) {
            if (other$message == null) {
                return this.getFirstSendTime() == other.getFirstSendTime() && this.getLastSendTime() == other.getLastSendTime() && this.isSended() == other.isSended();
            }
        }
        else if (this$message.equals(other$message)) {
            return this.getFirstSendTime() == other.getFirstSendTime() && this.getLastSendTime() == other.getLastSendTime() && this.isSended() == other.isSended();
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof MessageCache;
    }
    
    @Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $exchangeName = this.getExchangeName();
        result = result * 59 + (($exchangeName == null) ? 43 : $exchangeName.hashCode());
        final Object $routingKey = this.getRoutingKey();
        result = result * 59 + (($routingKey == null) ? 43 : $routingKey.hashCode());
        final Object $message = this.getMessage();
        result = result * 59 + (($message == null) ? 43 : $message.hashCode());
        final long $firstSendTime = this.getFirstSendTime();
        result = result * 59 + (int)($firstSendTime >>> 32 ^ $firstSendTime);
        final long $lastSendTime = this.getLastSendTime();
        result = result * 59 + (int)($lastSendTime >>> 32 ^ $lastSendTime);
        result = result * 59 + (this.isSended() ? 79 : 97);
        return result;
    }
    
    @Override
    public String toString() {
        return "MessageCache(id=" + this.getId() + ", exchangeName=" + this.getExchangeName() + ", routingKey=" + this.getRoutingKey() + ", message=" + this.getMessage() + ", firstSendTime=" + this.getFirstSendTime() + ", lastSendTime=" + this.getLastSendTime() + ", sended=" + this.isSended() + ")";
    }
}
